package com.heima.article.cilent;
/*
    
 需求描述：
 @Author: wang
 @Date: 2022/10/17 13:09
 
 */

import com.heima.apis.article.IArticleClient;
import com.heima.article.service.ApArticleService;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/article")
public class ArticleClient implements IArticleClient {
    @Autowired
    private ApArticleService articleService;

    @PostMapping("/save")
    public ResponseResult saveArticle(@RequestBody ArticleDto articleDto) throws Exception {
        return articleService.saveArticle(articleDto);
    }

}
